<?php
/**
* 
*/
class ControllerDianzan extends GetLoad
{
	

	public function index(){

		$this->load("Model/dianzan");

	}
	public function getdianzan($name_id){
		$this->index();
		$dianzan=new ModelDianzan();
		$return=$dianzan->getdianzan($name_id);
		foreach ($return as $value) {
			$data[]=array(
				'name' =>$dianzan->getname($value['name2_id'])['name'] , 
				'title'=>$dianzan->getinformation($value['information_id'])['title']

			);
		}


		//var_dump($data);
		$this->view("view/dianzan",$data);

	}

	public function dianzan($information_id){
		$this->index();
		$dianzan=new ModelDianzan();
		$dianzan->dianzan($information_id);

	}


}